import { reactive, onBeforeMount, onUnmounted } from "vue";
export default function (){
    let point = reactive({
        x: 0,
        y: 0,
      });
  
      function acquirePoint(event) {
        point.x = event.pageX;
        point.y = event.pageY;
      }
      onBeforeMount(() => {
        window.addEventListener("click", acquirePoint);
      });
      onUnmounted(()=>{
          window.removeEventListener('click',acquirePoint);
      });

      return point;
}